package com.epam.kulibaba.components.PanelCriterias;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;

import com.epam.kulibaba.components.Component;

public class PanelCornerCriterias extends Component {
	public static final String CORNERCRITERIAS = ".panel.corner.criteria";
	public static final String TOTAL = "div.total b";
	public static final String MINPRICES = "//div[@class = 'group'][1]/div[@class = 'is_empty_items']";
	public static final String MAXPRICES = "//div[@class = 'group'][2]/div[@class = 'is_empty_items']";
	public static final String SHOWALLPRODUCERS = "a.show_common_producer";
	public static final String LISTOFRODUCERS = "//div[@class = 'group'][3]/div[@class = 'is_empty_items']";
	public static final String WEIGHTADJUSTMENT = "//div[10]/div[@class = 'is_empty_items']/a[2]";
	
	@FindBy(css = PanelCornerCriterias.CORNERCRITERIAS)
	private WebElement cornerCriterias;
	
	@FindBy(xpath = PanelCornerCriterias.MINPRICES)
	private WebElement minPrices;
	
	@FindBy(xpath = PanelCornerCriterias.MAXPRICES)
	private WebElement maxPrices;
	
	@FindBy(css = PanelCornerCriterias.TOTAL)
	private WebElement total;
	
	@FindBy(css = PanelCornerCriterias.SHOWALLPRODUCERS)
	private WebElement linkShowAllProducers;
	
	@FindBy(xpath = PanelCornerCriterias.LISTOFRODUCERS)
	private WebElement ListOfproducers;
	
	
	@FindBy(xpath = PanelCornerCriterias.WEIGHTADJUSTMENT)
	private WebElement weightAdjustment;
	
	public WebElement getCornerCriterias(){
		return cornerCriterias;
	}
	
	public WebElement getTotal(){
		return total;
	}
	public WebElement getMinPrices(){
		return minPrices;
	}
	
	public WebElement getMaxPrices(){
		return maxPrices;
	}	
	public WebElement getLinkShowAllProducers(){
		return linkShowAllProducers;
	}
	public WebElement getListOfproducers(){
		return ListOfproducers;
	}
	
	public WebElement getWeightAdjustment(){
		return weightAdjustment;
	}	
	
	public static PanelCornerCriterias getPanelCornerCriterias(WebDriver driver){
		PanelCornerCriterias panelCornerCriterias = PageFactory.initElements(driver, PanelCornerCriterias.class);
		return panelCornerCriterias;
	}	
}
